<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>PriorityQueue (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">structs.PriorityQueue</span>
        <span>Extends</span>
        <span class="fn-name">
          <a href="class_goog_structs_Heap.html">
          goog.structs.Heap
</a>
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Class for Priority Queue datastructure.


  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="local_closure_goog_structs_priorityqueue.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/local/closure/goog/structs/priorityqueue.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td><span class="type"><a href="class_goog_structs_Heap.html">goog.structs.Heap</a></span></td><td></td></tr>
  <tr><td>goog.structs.PriorityQueue</td><td><span class="type"><a href="class_goog_structs_Heap.html">goog.structs.Heap</a></span></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.structs.PriorityQueue(<span></span>)
  </div>



<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_structs_PriorityQueue.html">
              goog.structs.PriorityQueue
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.PriorityQueue.prototype.dequeue"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">dequeue<span class="args">()</span>
        </span>
        &#8658; <span class="type">VALUE</span>
      </div>


     <div class="entryOverview">
       Retrieves and removes the head of this queue.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type">VALUE</span>&nbsp;
            The element at the head of this queue. Returns undefined if
    the queue is empty.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_priorityqueue.js.source.html#line64">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.PriorityQueue.prototype.enqueue"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">enqueue<span class="args">(<span class="arg">priority</span>,&nbsp;<span class="arg">value</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Puts the specified value in the queue.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">priority</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">The priority of the value. A smaller value here
    means a higher priority.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">value</span>
        : <span class="type">VALUE</span>
        <div class="entryOverview">The value.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_priorityqueue.js.source.html#line54">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_structs_Heap.html">
              goog.structs.Heap
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.clear"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">clear<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Removes all elements from the heap.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line332">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.clone"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">clone<span class="args">()</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="class_goog_structs_Heap.html">goog.structs.Heap</a></span>
      </div>


     <div class="entryOverview">
       Clones a heap and returns a new heap

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="class_goog_structs_Heap.html">goog.structs.Heap</a></span>&nbsp;
            A new goog.structs.Heap with the same key-value
    pairs.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line306">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.containsKey"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">containsKey<span class="args">(<span class="arg">key</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Whether the heap contains the given key.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">key</span>
        : <span class="type">K</span>
        <div class="entryOverview">The key to check for.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether the heap contains the key.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line294">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.containsValue"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">containsValue<span class="args">(<span class="arg">val</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Whether the heap contains the given value.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">val</span>
        : <span class="type">V</span>
        <div class="entryOverview">The value to check for.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether the heap contains the value.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line282">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.getCount"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getCount<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       The number of key-value pairs in the map

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The number of pairs.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line315">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.getKeys"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getKeys<span class="args">()</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type">K</span>&gt;
      </div>


     <div class="entryOverview">
       Gets the keys of the heap.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type">K</span>&gt;&nbsp;
            The keys in the heap.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line266">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.getLeftChildIndex_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getLeftChildIndex_<span class="args">(<span class="arg">index</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       Gets the index of the left child of the node at the given index.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">index</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">The index of the node to get the left child for.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The index of the left child.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line220">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.getParentIndex_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getParentIndex_<span class="args">(<span class="arg">index</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       Gets the index of the parent of the node at the given index.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">index</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">The index of the node to get the parent for.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The index of the parent.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line242">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.getRightChildIndex_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getRightChildIndex_<span class="args">(<span class="arg">index</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       Gets the index of the right child of the node at the given index.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">index</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">The index of the node to get the right child for.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The index of the right child.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line231">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.getValues"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getValues<span class="args">()</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type">V</span>&gt;
      </div>


     <div class="entryOverview">
       Gets the values of the heap.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type">V</span>&gt;&nbsp;
            The values in the heap.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line251">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.insert"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">insert<span class="args">(<span class="arg">key</span>,&nbsp;<span class="arg">value</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Insert the given value into the heap with the given key.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">key</span>
        : <span class="type">K</span>
        <div class="entryOverview">The key.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">value</span>
        : <span class="type">V</span>
        <div class="entryOverview">The value.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line71">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.insertAll"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">insertAll<span class="args">(<span class="arg">heap</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Adds multiple key-value pairs from another goog.structs.Heap or Object

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">heap</span>
        : <span class="type"><a href="class_goog_structs_Heap.html">goog.structs.Heap</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
        <div class="entryOverview">Object containing the data to add.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line83">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.isEmpty"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">isEmpty<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Returns true if this heap contains no elements.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether this heap contains no elements.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line324">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.moveDown_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">moveDown_<span class="args">(<span class="arg">index</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Moves the node at the given index down to its proper place in the heap.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">index</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">The index of the node to move down.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line160">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.moveUp_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">moveUp_<span class="args">(<span class="arg">index</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Moves the node at the given index up to its proper place in the heap.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">index</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">The index of the node to move up.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line195">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.peek"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">peek<span class="args">()</span>
        </span>
        &#8658; <span class="type">V</span>
      </div>


     <div class="entryOverview">
       Retrieves but does not remove the root value of this heap.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type">V</span>&nbsp;
            The value at the root of the heap. Returns
    undefined if the heap is empty.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line136">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.peekKey"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">peekKey<span class="args">()</span>
        </span>
        &#8658; <span class="type">V</span>
      </div>


     <div class="entryOverview">
       Retrieves but does not remove the key of the root node of this heap.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type">V</span>&nbsp;
            The key at the root of the heap. Returns undefined if the
    heap is empty.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line150">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.structs.Heap.prototype.remove"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">remove<span class="args">()</span>
        </span>
        &#8658; <span class="type">V</span>
      </div>


     <div class="entryOverview">
       Retrieves and removes the root value of this heap.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type">V</span>&nbsp;
            The value removed from the root of the heap.  Returns
    undefined if the heap is empty.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line115">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_structs_PriorityQueue.html">
              goog.structs.PriorityQueue
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.structs.PriorityQueue.prototype.constructor"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">constructor</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_priorityqueue.js.source.html#line42">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_structs_Heap.html">
              goog.structs.Heap
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.structs.Heap.prototype.nodes_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">nodes_</span>
        : 
     </div>


     <div class="entryOverview">
       The nodes of the heap.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_heap.js.source.html#line58">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>










<div class="section">
  <table class="horiz-rule">


  </table>
</div>



<h2>Static Properties</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.structs.PriorityQueue.superClass_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.structs.PriorityQueue.</span><span class="entryName">superClass_</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_structs_priorityqueue.js.source.html#line42">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package structs</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="structs.PriorityQueue"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
